package your.rpg.namespace;

import java.util.ArrayList;

public class Event {
	private ArrayList<String> event_start;
	private ArrayList<String> event_look1;
	private ArrayList<String> event_look2;
	private ArrayList<String> event_look3;
	private ArrayList<String> event_move1;
	private ArrayList<String> event_move2;
	private ArrayList<String> event_move3;
	private int levelName1;
	private int levelName2;
	private int levelName3;
	private String pointName1;
	private String pointName2;
	private String pointName3;
	
	public Event(int levelone, int leveltwo, int levelthree, String pointone, String pointtwo, String pointthree){
		levelName1 = levelone;
		levelName2 = leveltwo;
		levelName3 = levelthree;
		pointName1 = pointone;
		pointName2 = pointtwo;
		pointName3 = pointthree;
		event_start = new ArrayList<String>();
		event_look1 = new ArrayList<String>();
		event_look2 = new ArrayList<String>();
		event_look3 = new ArrayList<String>();
		event_move1 = new ArrayList<String>();
		event_move2 = new ArrayList<String>();
		event_move3 = new ArrayList<String>();
	}
	
	public void addEvent(String list_name,String action)
	{
		if(list_name.equals("event_start"))
		{
			event_start.add(action);
		}
		else if(list_name.equals("event_look1"))
		{
			event_look1.add(action);
		}
		else if(list_name.equals("event_look2"))
		{
			event_look2.add(action);
		}
		else if(list_name.equals("event_look3"))
		{
			event_look3.add(action);
		}
		else if(list_name.equals("event_move1"))
		{
			event_move1.add(action);
		}
		else if(list_name.equals("event_move2"))
		{
			event_move2.add(action);
		}
		else if(list_name.equals("event_move3"))
		{
			event_move3.add(action);
		}
	}
	
	public String getEvent(String list_name,int index){
		String action = "";
		if(list_name.equals("event_start"))
		{
			if(index < event_start.size())
			{
				action = event_start.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		else if(list_name.equals("event_look1"))
		{
			if(index < event_look1.size())
			{
				action = event_look1.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		else if(list_name.equals("event_look2"))
		{
			if(index < event_look2.size())
			{
				action = event_look2.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		else if(list_name.equals("event_look3"))
		{
			if(index < event_look3.size())
			{
				action = event_look3.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		else if(list_name.equals("event_move1"))
		{
			if(index < event_move1.size())
			{
				action = event_move1.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		else if(list_name.equals("event_move2"))
		{
			if(index < event_move2.size())
			{
				action = event_move2.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		else if(list_name.equals("event_move3"))
		{
			if(index < event_move3.size())
			{
				action = event_move3.get(index);
			}
			else
			{
				action = "No action found";
			}
		}
		return action;
	}

	public int getListSize(String list_name){
		int size = 0;
		if(list_name.equals("event_start"))
		{
			size = event_start.size();
		}
		else if(list_name.equals("event_look1"))
		{
			size = event_look1.size();
		}
		else if(list_name.equals("event_look2"))
		{
			size = event_look2.size();
		}
		else if(list_name.equals("event_look3"))
		{
			size = event_look3.size();
		}
		else if(list_name.equals("event_move1"))
		{
			size = event_move1.size();
		}
		else if(list_name.equals("event_move2"))
		{
			size = event_move2.size();
		}
		else if(list_name.equals("event_move3"))
		{
			size = event_move3.size();
		}
		return size;
	}
	
	public int getName(int number){
		int id = 0;
		if(number == 1)
		{
			id = levelName1;
		}
		else if(number == 2)
		{
			id = levelName2;
		}
		else if(number == 3)
		{
			id = levelName3;
		}
		return id;
	}
	
	public String getPointName(int number){
		String id = "";
		switch(number)
		{
		case 1: id=pointName1;
		case 2: id=pointName2;
		case 3: id=pointName3;
		}
		return id;
	}
}
